﻿using System.Collections.Generic;
using System.Data;

namespace PoliticalClassifier.Support
{
    /// <summary>
    /// IDataSetReader provides an API for reading and validating a data set.
    /// </summary>
    public interface IDataSetReader
    {
        /// <summary>
        /// Read data from a dataset and validate the results.
        /// </summary>
        /// <param name="dataSet">The dataset to read from.</param>
        /// <param name="loadResults">The list of errors and warnings that occured.</param>
        void ReadAndValidate(DataSet dataSet, IDataSourceLoadResults loadResults);

        /// <summary>
        /// Gets the set of voter record data.
        /// </summary>
        ICollection<IVoterRecord> VotersRecord { get; }

        /// <summary>
        /// Gets the count of voter records.
        /// </summary>
        int Count { get; }

        /// <summary>
        /// Gets the number of ignored rows.
        /// </summary>
        int IgnoredRowsCount { get; }

        /// <summary>
        /// Gets the names of the voter attributes.
        /// </summary>
        string[] ColumnNames { get; }
    }
}
